<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8"/>
    <title>Vue示例</title>

</head>

<body>
<div id="app" style="display: none" v-show="show">
    <button :class="classes">按钮</button>
</div>
<script charset="utf-8" src="../js/vue.min.js" type="text/javascript"></script>
<script type="text/javascript">
    new Vue({
        el: '#app',
        data: {
            show: true,
            size: 'large',
            disabled: true
        }, computed: {
            classes: function () {
                return [
                    'btn',
                    {
                        ['btn-' + this.size]: this.size !== '',
                        ['btn-disaabled']: this.disabled
                    }
                ]
            }
        }
    })
</script>
</body>

</html>
